package com.hxzy.tms;

import com.hxzy.tms.entity.User;

/**
 * 登录用户信息存入线程上下文
 * 
 * @author Administrator
 *
 */
public class SessionHolder {
    private static final ThreadLocal<User> holder = new ThreadLocal<User>();

    public static final User get() {
        return holder.get();
    }

    public static final void set(User session) {
        holder.set(session);
    }
    
    public static final void clear() {
        holder.remove();
    }

}
